<template>
  <n-config-provider :locale="zhCN" :date-locale="dateZhCN" :theme-overrides="themeOverrides" inline-theme-disabled>
    <n-dialog-provider>
      <NuxtLayout :hidden="show">
        <template #header>
          <AppHeader />
        </template>
        <template #content>
          <NuxtPage />
        </template>
        <template #footer>
          <AppFooter />
        </template>
      </NuxtLayout>
    </n-dialog-provider>
  </n-config-provider>
</template>
<script setup lang="ts">
import { zhCN, dateZhCN, NConfigProvider, NDialogProvider } from "naive-ui";
import pageInfoStore from "~/stores/pageInfo"
const pageInfo = pageInfoStore();
const show = ref(true);
onMounted(() => {
  // 在DOM元素渲染完成后执行的代码
  show.value = false;
});
onBeforeMount(() => {
  pageInfo.isMini = getBrowser().isMini;
  console.log("当前浏览器信息:", pageInfo.isMini);
})
const themeOverrides = {
  common: {
    // 主题色相关
    primaryColor: "#18a058",
    primaryColorHover: "#36ad6a",
    primaryColorPressed: "#0c7a43",
    primaryColorSuppl: "#36ad6a",

    // Info颜色相关
    infoColor: "#2080f0",
    infoColorHover: "#4098fc",
    infoColorPressed: "#1060c9",
    infoColorSuppl: "#4098fc",

    // Success颜色相关
    successColor: "#18a058",
    successColorHover: "#36ad6a",
    successColorPressed: "#0c7a43",
    successColorSuppl: "#36ad6a",

    // Warning颜色相关
    warningColor: "#f0a020",
    warningColorHover: "#fcb040",
    warningColorPressed: "#c97c10",
    warningColorSuppl: "#fcb040",

    // Error颜色相关
    errorColor: "#d03050",
    errorColorHover: "#de576d",
    errorColorPressed: "#ab1f3f",
    errorColorSuppl: "#de576d",
  },
};
</script>
